Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collections fix, always mount the doc cache #1062

Merged
merged 6 commits into from
Mar 8, 2022

Conversation

cidrblock
Copy link
Collaborator

In the case exit messages are generated during post-processing, still mount the collection doc cache if requested.

This allows for a rollback from within the collections action, but will still render the collections.

Also- in the case the collection doc cache is not mounted, provide an error and get out fast.

Related: #1061

Recreated with a

ansible-navigator
:collections --ee FFF
Traceback (most recent call last):
  File "/home/bthornto/github/ansible-navigator/venv/bin/ansible-navigator", line 33, in <module>
    sys.exit(load_entry_point('ansible-navigator', 'console_scripts', 'ansible-navigator')())
  File "/home/bthornto/github/ansible-navigator/src/ansible_navigator/cli.py", line 170, in main
    run_return = run(args)
  File "/home/bthornto/github/ansible-navigator/src/ansible_navigator/cli.py", line 108, in run
    wrapper(ActionRunner(args=args).run)
  File "/usr/lib64/python3.10/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/home/bthornto/github/ansible-navigator/src/ansible_navigator/action_runner.py", line 100, in run
    self._run_app(interaction)
  File "/home/bthornto/github/ansible-navigator/src/ansible_navigator/action_runner.py", line 112, in _run_app
    interaction = run_action(self.steps.current.name, self.app, self.steps.current)
  File "/home/bthornto/github/ansible-navigator/src/ansible_navigator/actions/_actions.py", line 160, in run_interactive
    return run_action(app=app, interaction=interaction)
  File "/home/bthornto/github/ansible-navigator/src/ansible_navigator/actions/collections.py", line 140, in run
    self._take_step()
  File "/home/bthornto/github/ansible-navigator/src/ansible_navigator/actions/collections.py", line 155, in _take_step
    result = run_action(self.steps.current.name, self.app, self.steps.current)
  File "/home/bthornto/github/ansible-navigator/src/ansible_navigator/actions/_actions.py", line 160, in run_interactive
    return run_action(app=app, interaction=interaction)
  File "/home/bthornto/github/ansible-navigator/src/ansible_navigator/actions/select.py", line 40, in run
    app.steps.append(app.steps.current.select_func())  # add next
  File "/home/bthornto/github/ansible-navigator/src/ansible_navigator/actions/collections.py", line 204, in _build_plugin_menu
    self._collection_cache.open()
AttributeError: 'Constants' object has no attribute 'open'

@cidrblock cidrblock merged commit 3300cf7 into ansible:main Mar 8, 2022
@cidrblock cidrblock added the bug Researched, reproducible, committed to fix label Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Researched, reproducible, committed to fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants